
import 'package:json_annotation/json_annotation.dart';
import 'package:reabamshengchan/src/reabam/operation/bean/base/rb_request.dart';
import 'package:reabamshengchan/src/reabam/operation/bean/base/rb_response.dart';
import 'package:reabamshengchan/src/reabam/operation/rb_config.dart';
import 'package:xsdk_flutter/xsdk/xsdk_flutter_package.dart';

//定义生成的文件 flutter pub run build_runner build --delete-conflicting-outputs
part 'bean_goodtype.g.dart';

@JsonSerializable(explicitToJson: true)
class GoodTypeRequest extends RBBaseRequest{

   String? itemType;
   String? optType;
   String? filterType;
   String? supplierId;

   GoodTypeRequest({this.itemType, this.optType, this.filterType, this.supplierId}):super();

   //添加固定格式
   factory GoodTypeRequest.fromJson(Map<String, dynamic> json) => _$GoodTypeRequestFromJson(json);
   Map<String, dynamic> toJson() => _$GoodTypeRequestToJson(this);

}


@JsonSerializable(explicitToJson: true)
class GoodTypeResponse extends RBBaseResponse{

  List<PlaceOrderType>? DataLine;

  GoodTypeResponse({this.DataLine});

  //添加固定格式
  factory GoodTypeResponse.fromJson(Map<String, dynamic> json) => _$GoodTypeResponseFromJson(json);
  Map<String, dynamic> toJson() => _$GoodTypeResponseToJson(this);

}

@JsonSerializable(explicitToJson: true)
class PlaceOrderType{
   String? ParentId;
   String? ParentCode;
   String? ParentName;
   List<PlaceOrderTypeSub>? TypeList;

   PlaceOrderType({this.ParentId, this.ParentCode, this.ParentName,
     this.TypeList});

   //添加固定格式
   factory PlaceOrderType.fromJson(Map<String, dynamic> json) => _$PlaceOrderTypeFromJson(json);
   Map<String, dynamic> toJson() => _$PlaceOrderTypeToJson(this);

}

@JsonSerializable(explicitToJson: true)
class PlaceOrderTypeSub{

   String? ParentID;
   String? TypeID;
   String? TypeCode;
   String? TypeName;
   String? fCode;

   PlaceOrderTypeSub({this.ParentID, this.TypeID, this.TypeCode, this.TypeName,
     this.fCode});

   //添加固定格式
   factory PlaceOrderTypeSub.fromJson(Map<String, dynamic> json) => _$PlaceOrderTypeSubFromJson(json);
   Map<String, dynamic> toJson() => _$PlaceOrderTypeSubToJson(this);
}